<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="cn.firstsoft.firstframe.plugins.compass.domain.RebuiltIndexRecord" table="rebuiltindex_record">
        <id name="id" type="integer">
            <column name="id" />
            <generator class="native" >
				<param name="sequence">REBUILTINDEX_RECORD_ID_SEQ</param>
            </generator>
        </id>
        
         <property name="rebuiltStartTime" type="timestamp">
            <column name="rebuilt_starttime" />
        </property>
        
         <property name="rebuiltEndTime" type="timestamp">
            <column name="rebuilt_endtime" />
        </property>
        
        <many-to-one name="rebuilter" class="org.springside.modules.security.domain.User" fetch="select">
            <column name="rebuilter_id" />
        </many-to-one>
        
         <property name="consumedTime" type="long">
            <column name="consumed_time" />
        </property>
        
        <property name="succeed" type="string">
            <column name="succeed" length="5" />
        </property>
        
        <property name="remark" type="string">
            <column name="remark" length="2000" />
        </property>
        <property name="exceptionMsg" type="string">
            <column name="exception_msg" length="2000" />
        </property>
        
        <set name="rebuiltIndexFailedDetails" inverse="true" cascade="all" order-by="id asc" >
            <key>
                <column name="rebuiltIndexRecord_id" />
            </key>
            <one-to-many class="cn.firstsoft.firstframe.plugins.compass.domain.RebuiltIndexFailedDetail" />
        </set>
    </class>
</hibernate-mapping>